/**
 * @description 单例
 * @date 2024.9.10
 * @author wz
 * @midify 2025.3.13
 * @editor wz
 */
export class Singleton {
    /**
     * 单例实例
     * @private
     */
    private static _instance = null;

    /**
     * 获取单例实例
     * @returns 单例实例
     */
    public static getInstance<T>(): T {
        if (this._instance == null) {
            this._instance = new this();
        }
        return this._instance as T;
    }
}